package com.action.blog.basic;

import java.util.Map;

import com.db.blog.basic.basicManager;
import com.db.blog.basic.basicVO;
import com.opensymphony.xwork2.ActionContext;

public class BasicUpdateAction {
	private basicManager basic;
	private String rname;
	private String rintro;
	private String rnickname;

	public basicManager getBasic() {
		return basic;
	}

	public void setBasic(basicManager basic) {
		this.basic = basic;
	}

	public void setRname(String rname) {
		this.rname = rname;
	}

	public void setRintro(String rintro) {
		this.rintro = rintro;
	}

	public void setRnickname(String rnickname) {
		this.rnickname = rnickname;
	}

	public String execute() throws Exception {
		basicVO vo = new basicVO();

		Map session = ActionContext.getContext().getSession();

		vo.setId((String) session.get("login"));
		vo.setRname(rname);
		vo.setRintro(rintro);
		vo.setRnickname(rnickname);

		basic.basicUpdate(vo);

		return "success";
	}
}
